import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import {resolve} from "node:path"

// https://vite.dev/config/
export default defineConfig({
  plugins:[vue()],
  resolve:{
    alias:{
      '@':resolve(__dirname,'src')
    }
  },
  server:{
    host:'0.0.0.0',
    port: 5173,
    strictPort: true,
    open: true,
    proxy:{
      '/api':{
        target:'http://192.168.137.1:8080',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/,'api'),
      }
    }
  }
})
